package com.heatingcharge.controller;

import com.heatingcharge.common.util.R;
import com.heatingcharge.security.JwtUser;
import com.heatingcharge.service.sys.ISysUserService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description: heating_charge_server
 * User: Devin
 * Date: 2019-07-05
 * Time: 15:24
 */
@Api(value="主页模块")
@RestController
public class IndexController {
    @Autowired
    private ISysUserService userService;

    @PostMapping("/login")
    public R login(@RequestBody JwtUser jwtUser){
        return R.ok(userService.login(jwtUser));
    }
}
